//package com.yiwei.ydd.activity;
//
//import android.content.Intent;
//import android.os.Bundle;
//import android.support.v7.widget.RecyclerView;
//import android.widget.ImageView;
//import android.widget.TextView;
//
//import com.yiwei.ydd.MainActivity;
//import com.yiwei.ydd.R;
//import com.yiwei.ydd.adapter.AreaSelectAdapter;
//import com.yiwei.ydd.adapter.CitySelectAdapter;
//import com.yiwei.ydd.base.BaseActivity;
//import com.yiwei.ydd.event.AddressSelectEvent;
//import com.yiwei.ydd.view.V19FrameLayout;
//import com.lljjcoder.citypickerview.model.CityModel;
//import com.lljjcoder.citypickerview.model.DistrictModel;
//
//import org.greenrobot.eventbus.EventBus;
//
//import java.util.ArrayList;
//
//import butterknife.BindView;
//import butterknife.ButterKnife;
//import butterknife.Unbinder;
//
///**
// * Created by xsooy-pc on 17-12-8.
// */
//
//public class AreaSelectActivity extends BaseActivity {
//    @BindView(R.id.btn_back)
//    ImageView btnBack;
//    @BindView(R.id.txt_title)
//    TextView txtTitle;
//    @BindView(R.id.txt_right)
//    TextView txtRight;
//    @BindView(R.id.layout_title)
//    V19FrameLayout layoutTitle;
//    @BindView(R.id.list)
//    RecyclerView list;
//
//    private Unbinder unbiner;
//    private AreaSelectAdapter adapter;
//
//    @Override
//    protected void onCreate(Bundle savedInstanceState) {
//        super.onCreate(savedInstanceState);
//        setContentView(R.layout.activity_province_select);
//        initBar();
//        unbiner = ButterKnife.bind(this);
//        init();
//    }
//
//    private void init() {
//        txtTitle.setText("选择城市");
//        adapter = new AreaSelectAdapter(this);
//        adapter.setOnChooseListener(new AreaSelectAdapter.OnChooseListener() {
//            @Override
//            public void onClick(String item) {
//                EventBus.getDefault().post(new AddressSelectEvent(item,""));
//                Intent intent = new Intent(AreaSelectActivity.this, MainActivity.class);
//                intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
//                startActivity(intent);
//                finish();
//            }
//        });
//        list.setAdapter(adapter);
//        initCity();
//    }
//
//
//    private void initCity() {
//        ArrayList<DistrictModel> data = getIntent().getParcelableArrayListExtra("area");
//        adapter.update(data);
//    }
//
//    @Override
//    protected void onDestroy() {
//        super.onDestroy();
//        unbiner.unbind();
//        unbiner = null;
//    }
//}
